<?php
include_once('config.php');
include_once('model/users.php');

$users = new Users();
$users->id 					= Session::User()->id;
$users->name 				= $_POST['name'];
$users->address				= $_POST['address'];
$users->hometown			= $_POST['hometown'];
$users->current_city		= $_POST['current_city'];
$users->gender 				= $_POST['gender'];
$users->birthdate			= $_POST['birthdate'];
$users->about_me			= $_POST['about_me'];
//$users->profile_picture 	= $_POST['profile_picture'];
$users->email_ad1			= $_POST['email_ad1'];
$users->email_ad2			= $_POST['email_ad2'];
$users->phone_number1		= $_POST['phone_number1'];
$users->phone_number2		= $_POST['phone_number2'];
$users->website				= $_POST['website'];
$users->relationship_status	= $_POST['relationship_status'];
try{
	$users->update();	//update
}
catch(Exception $e){
	Session::set_error($e->getMessage());
}

header("LOCATION: info.php");
?>